package com.crm.service.csd.customerManager;

import com.crm.model.entity.contactManager.Contact;
import com.crm.model.entity.contactManager.ContactInformation;
import com.crm.model.entity.contactManager.ContactInformationExample;
import com.crm.model.entity.customerManager.Customer;
import com.crm.model.entity.customerManager.CustomerContactPerson;
import com.crm.model.entity.customerManager.CustomerContactPersonExample;
import com.crm.model.qo.csd.customerManager.ContactMaintainQO;
import com.crm.model.vo.csd.customerManager.ContactMaintainVO;

import java.util.List;

/**
 * @author yincuimei
 * @Date 2021/10/25 15:26
 */
public interface ContactMaintainDbService {

    /**
     * (客服部)联系人管理-》联系人维护列表
     * @param contactMaintainQO --查询条件
     * @param orderStr          --排序
     * @author yincuimei
     * @return
     */
    List<ContactMaintainVO> selectContactMaintainVOList(ContactMaintainQO contactMaintainQO,String orderStr);

    /**
     * 联系人维护-》批量审核
     * @param contactIds --联系人ID集合
     * @param contact    --联系人实体(更新时间、更新人、审核信息)
     * @return
     */
    Boolean updateExamineByIdsBatch(List contactIds,Contact contact);

    /**
     * 联系人维护-》批量审核-通过联系人ID集合查询联系人集合
     * @param contactIds
     * @author yincuimei
     * @return
     */
    List<Contact> selectContactListByIds(List<String> contactIds);

    /**
     * 联系人维护-》删除(删除联系人表:lxr_contact)
     * @param contact
     * @author yincuimei
     * @return
     */
    Boolean deleteContactByContactId(Contact contact);

    /**
     * 联系人维护-》删除(删除联系方式表:lxr_contact_information)
     * @param contactInformation
     * @param example
     * @author yincuimei
     * @return
     */
    Boolean deleteContactInformationByContactId(ContactInformation contactInformation,ContactInformationExample example);

    /**
     * 联系人维护-》删除(个人联系人-删除客户表相关数据:chs_customer)
     * @param customer
     * @author yincuimei
     * @return
     */
    Boolean deleteCustomerByCustomerId(Customer customer);

    /**
     * 联系人维护-》删除(企业联系人-删除客户联系人表相关数据:chs_customer_contact_person)
     * @param customerContactPerson
     * @param example
     * @author yincuimei
     * @return
     */
    Boolean deleteCustomerContactPersonByCustomerId(CustomerContactPerson customerContactPerson, CustomerContactPersonExample example);
}